public class Main {
    public static void main(String[] args) {
        System.out.println("Hello world!");
    }
    class MyCircularQueue {
        public int front;
        public int rear;
        public int[] elem;

        public MyCircularQueue(int k) {
            elem=new int[k+1];
        }

        public boolean enQueue(int value) {
            if(isFull()) return false;
            elem[rear]=value;
            rear=(rear+1)%elem.length;
            return true;
        }

        public boolean deQueue() {
            if(isEmpty()) return false;
            front=(front+1)%elem.length;
            return true;
        }

        public int Front() {
            if(isEmpty()) return -1;
            return elem[front];
        }

        public int Rear() {
            if(isEmpty()) return -1;
            if(rear==0) return elem[elem.length-1];
            return elem[rear-1];
        }

        public boolean isEmpty() {
            return front==rear;
        }

        public boolean isFull() {
            return (rear+1)%elem.length==front?true:false;
        }
    }

//    public List<List<Integer>> levelOrder(TreeNode root) {
//        List<List<Integer>> list1= new ArrayList<>();
//        if(root==null) return list1;
//        Queue<TreeNode> queue =new LinkedList<>();
//        queue.offer(root);
//        while(!queue.isEmpty()){
//            List<Integer> root2= new ArrayList<>();
//            int size=queue.size();
//            while(size!=0){
//                TreeNode rt=queue.poll();
//                root2.add(rt.val);
//                if(rt.left!=null){
//                    queue.offer(rt.left);
//                }
//                if(rt.right!=null){
//                    queue.offer(rt.right);
//                }
//                size--;
//            }
//            list1.add(root2);
//        }
//        return list1;
//
//    }

//    public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) {
//        if (root == null)
//            return null;
//        if (root == p|| root == q)
//            return root;
//        TreeNode leftTree = lowestCommonAncestor(root.left, p ,q);
//        TreeNode rightTree = lowestCommonAncestor(root.right, p, q);
//        if (leftTree != null && rightTree != null)
//            return root;
//        if (leftTree != null) {
//            return leftTree;
//        }
//        if (rightTree != null)
//            return rightTree;
//        return null;
//    }
}